<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>文章管理</title>
    <link rel="stylesheet" type="text/css" href="__STATIC__/hdjs/hdjs.css"/>
    <script src="__STATIC__/js/jquery-1.8.2.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="__STATIC__/hdjs/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
   
</head>
<body>
<div class="wrap">
    <table class="table2 hd-table hd-table-list">
        <thead>
        <tr>
            <td width="100">品牌id</td>
            <td width="100">链接名称</td>
            <td width="100">LOGO</td>
            <td width="100">排序</td>
            <td width="100">是否热门</td>
            <!--<td width="50"></td>-->
            <td width="50">操作</td>
            
        </tr>
        </thead>
        <tbody>
           <foreach from="$data" key="$k" value="$v">
	        	<tr cid="{$v.cid}" pid="{$v.pid}">
	           
		            <td>{$v.bid}</td>
		            <td>{$v.bname}</td>
		            <td><img src="__ROOT__/{$v.logo}" style="width:72px;height: 32px;"/></td>
		            <td>{$v.sort}</td>
		            <td><if value="$v['is_hot']==0">
		            	否
		            <else/>
		            	是
		            </if> </td>
		            <!--<td></td>-->
		           
		            <td width="200">
						<a href="{|U:'edit',array('bid'=>$v['bid'])}" class="hd-btn hd-btn-success hd-btn-xm">编辑</a>
						<a href="javascript:del_modal({$v.bid});" class="hd-btn hd-btn-danger hd-btn-xm">删除</a>
		            </td>
	        	</tr>
	    </foreach>
        </tbody>
    </table>
    <a href="{|U:'addSon',array('cid'=>$v['cid'])}" class="hd-btn hd-btn-primary hd-btn-xm">排序</a>
    <style type="text/css">
    		.page_hdcms{
    			margin-top: 20px;
    			text-align: center;
    		}
    		.page_hdcms a{
    			padding: 3px 5px;
    			margin-left: 3px;
    			border: 1px solid #CCCCCC;
    			
    		}
    		.page_hdcms strong{
    			padding: 3px 5px;
    			margin-left: 3px;
    			background: red;
    			color: white;
    		}
    </style>
    <div class="page_hdcms">
        {$page}
    </div>
</div>

</body>
<script type="text/javascript">
	function del_modal(bid){
		hd_modal({
            width: 400,//宽度
            height: 220,//高度
            title: '确认删除吗？',//标题
            content: '',//提示信息
            button: true,//显示按钮
            button_success: "确定",//确定按钮文字
            button_cancel: "取消",//关闭按钮文字
            timeout: 0,//自动关闭时间 0：不自动关闭
            shade: true,//背景遮罩
            shadeOpacity: 0.3,//背景透明度
            success: function () {//点击确定后的事件
				location.href='{|U:"del"}' + '&bid=' + bid;
            },
            cancel: function () {//点击关闭后的事件

            }
        });
	}
</script>
</html>


